<?php

/**
 * statistic actions.
 *
 * @package    baumarktforsibers.kg
 * @subpackage statistic
 * @author     Belitskii Ivan
 * @version    SVN: $Id: actions.class.php 23810 2009-11-12 11:07:44Z Kris.Wallsmith $
 */
class statisticActions extends sfActions {

    /**
     * Executes index action
     *
     * @param sfRequest $request A request object
     */
    public function executeIndex(sfWebRequest $request) {
        $sort = $request->hasParameter('sort') && $request->getParameter('sort') == 'count' ? "counter": "totals";
        $this->stast = Doctrine::getTable('orders')->getOrderTotalSumOfUser($sort);
    }

}
